package com.atguigu.gmall.payment.service;

import com.atguigu.gmall.model.enums.PaymentType;
import com.atguigu.gmall.model.order.OrderInfo;
import com.atguigu.gmall.model.payment.PaymentInfo;

import java.util.Map;

public interface PaymentService {
    //保存交易记录
    void savePaymentInfo(OrderInfo orderInfo,String paymentType);

    //根据订单号查找交易记录
    PaymentInfo getPaymentInfo(String outTradeNo, PaymentType alipay);

    //更新交易记录状态和赋值回调的数据
    void paySuccess(String outTradeNo, PaymentType alipay, Map<String, String> paramsMap);

    //修改交易记录状态
    void updatePaymentInfo(String outTradeNo, PaymentType alipay, PaymentInfo paymentInfo);

    //关闭交易记录
    void closePayment(Long orderId);
}
